A transaction comprises a sequence of operations that behave in an atomic, all-or-nothing fashion. When a failure occurs during a transaction, the transaction must be rolled back in order to return the system to its prior state. For example, if a transaction that transfers money from a savings account to a checking account fails after money has been deducted from the savings account, but before money has been added to the checking account, a rollback of the transaction will restore the balance of the savings account to its value prior to the deduction. A data-processing system (e.g., a mainframe computer, a server, a desktop computer, etc.) that processes transactions is referred to as a transaction-processing system.